import { createApp } from 'vue'
import { createPinia } from 'pinia'
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
import router from './router'
import ElementPlus from 'element-plus'
import Vant from 'vant'
import App from './App.vue'


// 导入样式
import 'element-plus/dist/index.css'
import 'vant/lib/index.css'
import '@/assets/styles/global.less'

// 创建 Pinia 实例
const pinia = createPinia()
pinia.use(piniaPluginPersistedstate)

var _hmt = _hmt || [];
(function() {
  var hm = document.createElement("script");
  hm.src = "https://hm.baidu.com/hm.js?c0922caa2e8beee448871a29003424d7";
  var s = document.getElementsByTagName("script")[0]; 
  s.parentNode.insertBefore(hm, s);
})();


// 创建应用实例
const app = createApp(App)
// 使用插件
app.use(pinia)
app.use(router)
app.use(ElementPlus)
app.use(Vant)

// 挂载应用
app.mount('#app')